package org.seckill.TestAop;

/**
 * Created by wangyg 
 * on 2017/4/19 17:06
 */
public class Main {
	public static void main(String[] args) throws Exception {
		IPerson conceretPerson = (IPerson)new ProxyHandler().bind(new Xiaoming());
		conceretPerson.say();
//		Object bind = new ProxyHandler().bind(new Xiaoming());
//		Method method=bind.getClass().getDeclaredMethod("say");
//		Object invoke = method.invoke(bind);

		Xiaoming xm=new Xiaoming();
		Class<?>[] interfaces = xm.getClass().getInterfaces();
		for (Class<?> anInterface : interfaces) {
			System.out.println(anInterface);
		}
		System.out.println("---------------");
		ProxyHandler ph=new ProxyHandler();
		Class<?>[] interfaces1 = ph.getClass().getInterfaces();
		for (Class<?> aClass : interfaces1) {
			System.out.println(aClass);
		}

		System.out.println("---------------");
		Main main=new Main();
		Class<?>[] interfaces2 = main.getClass().getInterfaces();
		for (Class<?> aClass : interfaces2) {
			System.out.println(aClass);
		}

	}
	
}
